<ui:composition 
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:meta="http://deltaset.org/deltaset-meta"
    xmlns:composite="http://java.sun.com/jsf/composite">
    <composite:interface>
        <composite:attribute name="label"/>
        <composite:attribute name="values" type="java.util.Collection"/>
        <composite:attribute name="meta" required="true"/>
    </composite:interface>

    <composite:implementation>
        <h:outputLabel for="text" value="#{cc.attrs.label}:" rendered="#{not empty cc.attrs.label}" styleClass="ds-label"/>
        <h:panelGroup layout="block" id="text">
            <c:if test="#{not empty cc.attrs.label}">
                <f:attribute name="styleClass" value="ds-field"/>
            </c:if>
            <ui:repeat value="#{cc.attrs.meta.convertToList(cc.attrs.values)}" var="elm" rendered="#{not empty cc.attrs.values}">
                #{cc.attrs.meta.modelTitle(elm)}<br/>
            </ui:repeat>
            <h:outputText value="&#160;" rendered="#{empty cc.attrs.values}"/>
        </h:panelGroup>  
    </composite:implementation>
</ui:composition>